home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / assem.zip / ASSEM.DOC < prev   
Text File  |  1985-10-04  |  4KB  |  85 lines

  1.                     Using ASSEM.BAT with DOS 2.10 DEBUG.COM
  2.  
  3.  
  4.  
  5. As most of us know IBM DOS Version 2.10 comes with an assembler in the form
  6. of DEBUG.COM.  DEBUG also includes an unassembler and services for reading
  7. from and writing to disk.  These services combine to make DEBUG the tool of
  8. choice for writing and debugging small .COM programs.  Where you run into
  9. trouble is finding you have left out or duplicated a line when assembling
  10. a program and the only way to correct your mistake is to back up and reenter
  11. from where you made the mistake.  Or how about when you are debugging and you
  12. need to see two sections of code at the same time but they won't fit on screen
  13. together.  ASSEM.BAT provides an answer to these problems by combining the
  14. power of DEBUG with the versatility of DOS 2.10.
  15.  
  16. By taking advantage of the redirection of standard input and output available
  17. through DOS 2.10 and the conditional execution of BATCH files I have developed
  18. a system which does the following:
  19.      -allows source code to be written and editted with EDLIN
  20.      -allows comments to be included with the source
  21.      -provides an output listing complete with comments, addresses,
  22.           and the precise location of any errors
  23.      -allows automated unassembly of .COM programs, including source
  24.           and object code and addresses
  25.      -includes command level syntax checking
  26. Though not a replacement for the IBM or Microsoft Macro Assembler, this system
  27. has proved to be a considerable improvement over DEBUG alone.
  28.  
  29. The assembly routine of ASSEM requires that the following conditions be met
  30. upon execution:
  31.      -DEBUG is present
  32.      -filename.ASM exists
  33. The assembly routine will search for both files.  If either one is not found
  34. the assembly is aborted.  Otherwise filename.ASM is defined as the standard
  35. input for DEBUG and filename.LST is defined as the standard output.  If a .COM
  36. file is to be produced the commands for doing so must be included in
  37. filename.ASM for use by DEBUG.  Note that ALL commands needed by DEBUG must
  38. be included in filename.ASM, including the (Q)uit command.  If the quit
  39. command is left out the system will hang and the computer will have to be
  40. rebooted.  The usual commands needed by DEBUG are:
  41.      -(A)ssemble
  42.      -(R)egister CX (BX always =0000h for .COM files)
  43.      -(N)ame filename.COM
  44.      -(W)rite
  45.      -(Q)uit
  46. Also be sure and include at least one blank line containing nothing but a
  47. carriage return after the last source instruction.  This is necessary toget
  48. DEBUG out of the assembler and back to command level.
  49.  
  50. The unassembly routine requires that the following conditions be met
  51. upon execution:
  52.      -DEBUG is present
  53.      -filename.COM exists
  54. The unassembly routine will search for both files.  If either one is not found
  55. the unassembly is aborted.  Otherwise filename.COM is defined as the standard
  56. input for DEBUG and filename.FIL is defined as the standard output.  The
  57. routine will then ask for the commands to be used during the unassembly.
  58. You will have to perform the unassembly manually before invoking this routine
  59. in order to know the ranges you want to unassemble and those you want dumped.
  60. The most common commands used in this routine are:
  61.      -(N)ame filename.COM
  62.      -(L)oad
  63.      -(R)egister CX (gives the program length)
  64.      -(U)nassemble
  65.      -(D)ump
  66.      -(Q)uit
  67. Don't forget to include a quit command.
  68.  
  69. The syntax to be used when invoking ASSEM.BAT is:
  70.      -ASSEM f filename
  71. where,
  72.      -f is A or a to assemble; U or u to unassemble
  73.      -filename is [d:][path]filename (never include an extension)
  74.  
  75. The file FUNCTION.ASM is included as an example.  To produce a .COM file of
  76. give the command "ASSEM A FUNCTION".  It will take a minute or two for the
  77. file to be assemble so be patient.  The files FUNCTION.LST and FUNCTION.COM
  78. will be generated.  Try using the command "ASSEM U FUNCTION" to create an
  79. unassembled listing of FUNCTION.COM.
  80.  
  81. Instructions for using the FUNCTION.COM program are in the file FUNCTION.DOC.
  82.  create an
  83. unassembled listing of FUNCTION.COM.
  84.  
  85. Instructions for using the FUNCTION.COM program are i